package cn.tedu.springbootmybatis.pojo.vo;

import cn.tedu.springbootmybatis.Constant.SystemConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: jiawp
 * @date: 2023/7/31 8:15
 * @description:
 **/
@Data
public class AdminInfoVo {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "年龄")
    private int age;

    @ApiModelProperty(value = "性别")
    private String sex;

    private String sexStr;

    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "电子邮箱")
    private String email;

    @ApiModelProperty(value = "描述")
    private String description;

    public String getSexStr() {
        switch (sex) {
            case SystemConstant.ZERO:
                sexStr = SystemConstant.MAN;
                break;
            case SystemConstant.ONE:
                sexStr = SystemConstant.WOMAN;
                break;
            default:
                sex = SystemConstant.KNOWN;
                break;
        }
        return sexStr;
    }
}
